//创建Node.js应用

//导入所需要的包，使用require指令来加载HTTP模块
var http = require("http")

//使用http.createServer方法创建HTTP服务器。通过参数请求并响应。编写示例实现返回""hello world"
//服务器在8081端口监听
http.createServer(function (request, response) {  
   response.writeHead(200, {'Content-Type': 'text/plain'});  
   response.end('Hello World\n');
}).listen(8081);
console.log('Server running at http://127.0.0.1:8081/');

console.log('hello world')